package com.chy.edu.client;

import com.chy.commonutils.Result;
import com.chy.edu.client.impl.VodDegradeFeignClient;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "service-vod",fallback = VodDegradeFeignClient.class)
@Component
public interface VodClient {

    // 定义调用的方法路径
    @ApiOperation(value = "根据视频id删除阿里云视频")
    @DeleteMapping("/eduvod/video/removeAlyVideo/{id}")
    Result removeAlyVideo(@PathVariable("id") String id);

    @ApiOperation(value = "删除多个阿里云视频")
    @DeleteMapping("/eduvod/video/delete-batch")
    Result deleteBatch(@RequestParam("videoIdList") List<String> videoIdList);
}
